assume cs:code, ds:data
data segment
    db 'welcome to masm!'
data ends

code segment
start:  mov ax, data
        mov ds, ax
	mov ax, 0B800h ;立即数不能以字母开头,前面必须加0
        mov es, ax
        mov bx, 06E0h

        mov cx, 10h
        mov si, 0 ;需要输出字符串的索引，每次循环只能加1
        mov di, 0 ;输出位置的索引
s:      mov al, [si]
        mov es:[bx + di + 40h], al
        inc di
        mov byte ptr es:[bx + di + 40h], 42h ;红底绿字
        inc di
        inc si
        loop s

        mov ax, 4c00h
        int 21h
code ends

end start


